<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:p="http://primefaces.org/ui" 
      xmlns:composite="http://java.sun.com/jsf/composite">

    <composite:interface>
        <composite:attribute name="backingBean" />
        <composite:attribute name="styleClass" />
    </composite:interface>

    <composite:implementation>
        <article class="#{cc.attrs.styleClass}">
            <h:panelGroup styleClass="header" layout="block">
                <h:graphicImage url="/img/no-photo.jpg" />
                <h:link styleClass="item-view" outcome="item-view"  >
                    <f:param name="id" value="#{cc.attrs.backingBean.id}" />
                    <h2><h:outputText value="#{cc.attrs.backingBean.title}" /></h2>
                </h:link>
                <h:panelGroup styleClass="small-info">
                    <h:outputText value="#{cc.attrs.backingBean.addedDate}" >
                        <f:convertDateTime pattern="#{msgs['home.content.date.pattern']}"/>
                    </h:outputText>
                    -
                    <h:outputText value="#{cc.attrs.backingBean.postalCode}" />
                    -
                    <h:outputText value="#{cc.attrs.backingBean.region.name}" />
                </h:panelGroup>
            </h:panelGroup>
            <h:panelGroup styleClass="description" layout="block">
                <p class="description-text"><h:outputText value="#{cc.attrs.backingBean.shortDescription}" /></p>
            </h:panelGroup>
        </article> 
    </composite:implementation>
</html>
